提供设备以及部署相关日志查询。
GET /api/v1/monitor/logs
Query:
Name | Type | Description | Required |
---|---|---|---|
currentPage | int | 页码 | Yes |
pageSize | int | 每页条数 | Yes |
deviceId | string | 设备ID | Yes |
modules | []string | 边缘节点部署的应用模块名称(remotemqtt, master, localhub, agent, scenelinkage, msgroute, dataparser, modbusdriver) | No |
level | string | 日志级别(INFO, WARN, ERROR) | No |
startTime | date | 查询起始时间,例如:2020-04-27T16:00:00.000Z(默认为最近一小时) | No |
finishTime | date | 查询终止时间,例如:2020-04-27T16:00:00.000Z(默认为最近一小时) | No |
cURL example:
curl --location --request GET '{{address}}/api/v1/monitor/logs?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}&deviceId={deviceId}¤tPage={currentPage}&pageSize={pageSize}&modules={modules}&level={level}&startTime={startTime}&finishTime={finishTime}'
Response body:
Name | Type | Description |
---|---|---|
id | long | 日志ID |
time | int | 日志产生时间 |
module | string | 日志所属模块 |
level | string | 日志级别 |
deviceId | string | 设备ID |
msg | string | 日志信息 |
Response example:
{
"success": true,
"code": 0,
"msg": "",
"data": {
"content":[
{
"id": 2312312343214,
"time": "2019/12/27 12:38:01",
"module": 'monitor',
"level": "info",
"deviceId": "1000089",
"msg": "xxxxdsafadsfadfads",
}
],
"currentPage": 0,
"pageSize": 0,
"totalCount": 0,
"totalPage": 0
}
}
GET /api/v1/monitor/logs/{devId}/modules
Path:
Name | Type | Description | Required |
---|---|---|---|
devId | string | 设备ID | Yes |
cURL example:
curl --location --request GET '{{address}}/api/v1/monitor/logs/{devId}/modules?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}'
Response body:
Name | Type | Description |
---|---|---|
modules | []string | 模块数组 |
Response example:
{
"success": true,
"code": 0,
"msg": "",
"data": {
"modules":[
"monitor"
]
}
}
GET /api/v1/monitor/configlog/page
Query:
Name | Type | Description | Required |
---|---|---|---|
currentPage | int | 页码 | Yes |
pageSize | int | 每页条数 | Yes |
deviceId | string | 设备ID | Yes |
start | long | 查询起始时间(单位:毫秒) | No |
end | long | 查询终止时间(单位:毫秒) | No |
cURL example:
curl --location --request GET '{{address}}/api/v1/monitor/configlog/page?accessKeyId={accessKeyId}&signatureNonce={signatureNonce}&signature={signature}¤tPage={currentPage}&pageSize={pageSize}&deviceId={deviceId}&start={start}&end={end}'
Response body:
Name | Type | Description |
---|---|---|
deviceId | string | 设备ID |
time | int | 日志产生时间 |
result | boolean | 部署结果 |
msg | string | 日志信息 |
Response example:
{
"success": true,
"code": 0,
"msg": "",
"data": {
"content":[
{
"deviceId": 2312312343214,
"time": "20191227123801",
"result": "true",
"msg": "dfadafdfadfa"
}
],
"currentPage": 0,
"pageSize": 0,
"totalCount": 0,
"totalPage": 0
}
}